<template>
  <view class="map-box">
    <amap @commitCheck="commitCheck" :Radius='Radius' :mapKey='mapKey' :showResetting='showResetting' :listIco='listIco'
      :orientationIco='orientationIco' :resettingIco='resettingIco'></amap>
  </view>
</template>

<script>
import amap from '@/components/amap-map';
export default {
  components: {
    amap
  },
  data() {
    return {
      mapKey: '95ab2290fe58960a5208209750620518',
      address: '',
      latitude: '',
      longitude: '',
      listIco: '/static/image/map/item-inx.png',
      orientationIco: '/static/image/map/map-inx.png',
      resettingIco: "/static/image/map/position.png",
      showResetting: true,
      Radius: ''
    };
  },
  onUnload() {   // 当页面销毁时需要把该方法销毁
    uni.$off('commitCheck');
  },
  methods: {
    commitCheck(e) {
      console.log(e, 565);
      uni.$emit('commitCheck', e);
      uni.navigateBack({
        delta: 1
      });
    }
  }
};
</script>

<style lang="scss">
.map-box {
  height: 100vh;
  width: 100vw;
}
</style>
